package Android.SniffDroid;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * receives Intents
 * @author Mike
 */
public class SniffReceiver extends BroadcastReceiver {
    /**
    * receives BOOT_COMPLETED events sent by Android 
    * @param cntxt the context of the intent
    * @param intent the received intent (most likely a BOOT_COMPLETED event)
    */
    @Override
    public void onReceive(Context cntxt, Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
			Intent activityStartIntent = new Intent(cntxt, SniffDroid.class);
			activityStartIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            cntxt.startActivity(activityStartIntent);
        }
    } 
}
